
import useDocumentTitle from '../hooks/useDocumentTitle';

import { Header } from '../components/Header/Header';
import { Footer } from '../components/Footer';

import { useParams } from 'react-router-dom';
import { NewsContent } from '@/components/NewsContent';
import useGetData from '@hooks/useGetData';

export default function NewsPage() {
  const { pageid } = useParams();
  const [Data, loading] = useGetData(`/api/data/news/${pageid}`);
  useDocumentTitle(`${Data.title}-高考志愿填报系统`);
  return (
    <>
      <Header />
      <div className='bg-[#f8f8f8] p-10'>
        <NewsContent newsData={Data} loading={loading} />
      </div>
      <Footer />
    </>
  );
}






